#pragma once

#include "i_component_def.h"
#include <functional>

typedef std::function<void(const CComponentPtr&)> CComponentCallBackFn;

struct IComponentContainer
{
	virtual err_code_t Register(IComponentHolder& holder) = 0;
	virtual void Unregister(IComponentHolder& holder) = 0;

	virtual void PostComponent(ComID, const CComponentCallBackFn& cb) = 0;

	virtual void RemoveComponent(ComID com_id) = 0;

	virtual err_code_t Start() = 0;
	virtual void Stop() = 0;
	virtual void Update() = 0;
};
